#pragma once

#include "main.h"
#include "Vec2.h"

//Kostra

	
struct Edge{
	union{
		struct{
			Vec2 a, b;
		};
		char str[32];
	};
	Edge(){};
	Edge(Vec2 _a, Vec2 _b){
		a.x = _a.x;
		a.y = _a.y;
		b.x = _b.x;
		b.y = _b.y;
	}
	Edge &operator=(const Edge &rhs);
	int operator==(const Edge &rhs) const;
	bool operator<(const Edge &rhs) const;
	bool less(const Edge &lhs ,const Edge &rhs) const;

};


class Skeleton
{
public:
	Skeleton(int month);
	Skeleton(void);
	~Skeleton(void);

	static int s_MaxPlantWidth;
	//Zoznam vektorov kosry

	void addPoint(Vec2 &v);
	void loadImage();

	set <Edge> edge;
	set <Vec2> vec;
	//Bitmap* mask;
	
	Bitmap* transform(Bitmap* bm);

	LPCHAR imagePath;
	Bitmap* image;
	int month;
	//Typ kostry
	int type;

	int plantMinWidth;
	int plantMaxWidth;

	int getMinWidth();
	void setMinWidth(int w);

	int getMaxWidth();
	void setMaxWidth(int w);

	double getPMaxWidth();
	double getPMinWidth();
private:

	
};

